
RedDotsOneKeyRefineHandler ={};
local this = RedDotsOneKeyRefineHandler;

function RedDotsOneKeyRefineHandler.init()
    CloseEvent(Config.EventType.Fresh_Equip,this.update);
    ListenEvent(Config.EventType.Fresh_Equip,this.update);
    CloseEvent(Config.EventType.Fresh_Currency,this.update);
    ListenEvent(Config.EventType.Fresh_Currency,this.update);
    CloseEvent(Config.EventType.Fresh_Currency,this.update);
    ListenEvent(Config.EventType.Fresh_Currency,this.update);
    return this;
end

function RedDotsOneKeyRefineHandler.getFlag(partnerId)
    if not logicMgr.FuncOpenManager.isOpen(Config.FuncOpenType.allEquipRefine) then
        return Config.RedDotsFlagState.None
    end
    local flag = logicMgr.EquipManager.CheckOneKeyRefine(partnerId)
    if flag then
        return Config.RedDotsFlagState.Needful
    end
    return Config.RedDotsFlagState.None
end


function RedDotsOneKeyRefineHandler.update()
    RedDotsManager.addBroadcast(Config.RedDotsType.OneKeyRefine);
end